The invention relates to a method and apparatus for detecting digital codewords of a codeword system.
An example of a codeword system is a system of digital codewords of varying length in which no short codeword forms the prefix of a longer codeword in the same system.
In the field of picture (including text) storage and transmission, it is conventional practice to scan the picture line by line to determine run lengths of pixels of different colours in each line and then to code this information in order to minimise storage space or transmission time. One example of such a codeword system is the modified "Huffman" (MH) codeword system as described in Recommendation T.4--"Standardisation of Group III Facsimile Apparatus for Document Transmission" published by the CCITT.
The codewords are commonly of differing lengths and this can lead to difficulties in detecting individual codewords in an incoming data stream for subsequent decoding unless markers are provided between successive codewords.
Various methods have been proposed in the past to deal with this, one of which comprises applying the serial data stream of codewords to a shift register. Subsequently, the loaded data is applied to a ROM which is effectively a look-up table and which determines whether there is a codeword present in the loaded data. If there is, the ROM will output the decoded data and will also output a number corresponding to the number of bits in the detected codeword so that the shaft register will then shift in a corresponding count of new data bits. The process is then repeated. This procedure requires a large ROM in view of the necessity of counting the number of bits in the codeword and providing a suitable output which may comprise three or more binary digits.